package com.qezhhnjy.es;

import com.qezhhnjy.es.first.First;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

/**
 * @author zhaoyangfu - 2021/4/8 19:09
 */
@SpringBootApplication
@Slf4j
public class ESApplication implements CommandLineRunner {

    @Resource
    private First       first;

    public static void main(String[] args) {
        SpringApplication.run(ESApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        // System.out.println(first.createIndex("user3").index());
        // System.out.println(first.getIndex("user3").getSettings());
        // first.insertUser(User.builder().name("sara").age(37).sex("female").build());
        // first.updateUser();

    }
}
